home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
windownt
/
perlnt.zip
/
eg
/
grepsrc.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-07-25
|
520b
|
30 lines
@rem = '-*- Perl -*-';
@rem = '
@echo off
perl -S %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
';
require 'ntfind.pl';
$switches = substr($ARGV[0], 0) eq "-" ? $ARGV[0] : "";
$pattern = substr($ARGV[0], 0) eq "-" ? $ARGV[1] : $ARGV[0];
&find('.');
exit;
sub wanted {
local($x);
local($line);
return if !/^.*[.][chy]$/;
$x = `grep $pattern $switches $_`;
return if $x eq "";
foreach $line (split(/\n/, $x)) {
print "$_: $line\n";
}
}
__END__
:endofperl